<%-- 
    Document   : deleteEmployee
    Created on : May 5, 2013, 11:40:58 PM
    Author     : Byung Park
--%>

<%@page import="java.sql.ResultSet"%>
<%@page import="db.UserDAO"%>
<%@page import="java.sql.Statement"%>
<%@page import="java.sql.Connection"%>
<%@page import="db.DB"%>
<%
    
    String email = request.getParameter("email");
    String lastName = request.getParameter("lastName");
    String firstName = request.getParameter("firstName");
    String address = request.getParameter("address");
    String zipCode = request.getParameter("zipCode");
    String ssn = request.getParameter("ssn");
    String hourlyRate =request.getParameter("hourlyRate");
    String telephone =request.getParameter("telephone");
    String startDate = request.getParameter("startDate");
    String password = request.getParameter("password");
    try {
        DB data = new DB();
        Connection conn = data.getConnection();
        Statement st = null;
        st = conn.createStatement();
        String query = "INSERT INTO Users (Email,LastName,FirstName,Address,ZipCode,SSN,HourlyRate,Telephone,StartDate,Password,Authority, Level) VALUES ('" + email + "','" + lastName + "','" + firstName + "','" + address +"','" + zipCode +"','" + ssn +"','" + hourlyRate +"','" + telephone + "','" + startDate +"','" + password + "','1', '3');";
        out.println(query);
        st.execute(query);
        response.sendRedirect("employeeList.jsp");

    } catch (Exception e) {
    };
%>

